<template>
  <div class="header tac flex-justify pl15">
    <span class="iconfont icon-mulu iconfont-mulu"></span>
    <div class="fs14 cursor" @click="exitLogin">log out</div>
  </div>
</template>

<script>
  import vuex from '../../store/index.js'
	import router from '../../router/index.js'
  export default {
    name: 'Header',
    props:[''],
    data: function() {
      return {
        msg: 'Welcome to Your Vue.js App 钟海',
         homeNav:false
      }
    },
    created: function() {
      //返回实时交易额/


    },
    mounted: function() {

    },
    methods: {
      addDelStatus: function(index) {
         this.curId = index
      },
      handleOpen:function(){

      },
      handleClose:function () {



      },
			exitLogin(){
        let leftMenuActiveIndex = vuex.stores.state.leftMenuActiveIndex;

				let defaultActive = {
					defaultActive: leftMenuActiveIndex
				};
				sessionStorage.setItem('defaultActive', JSON.stringify(defaultActive));
        sessionStorage.setItem('routerName', this.$route.name);
        console.log(vuex.stores.state);


        this.$router.push({path:'/'});

			}

    }

  }
</script>

<style scoped>
  .header{
    height: 50px;
    position: absolute;
    top: 0;
    left: 200px;
    right: 0;
    z-index: 11;
    padding-right: 15px;
    background-color: #fff;
    border-bottom: 1px solid #eee;
    color: #333;
    font-size: 14px
  }
  .iconfont-mulu{
    font-size: 24px;
    color: #333;
		font-weight: bold;
  }
</style>
